controlling function